home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 1999 August / SGI Freeware 1999 August.iso / dist / fw_psutils.idb / usr / freeware / bin / fixscribeps.z / fixscribeps
Encoding:
Text File  |  1999-07-16  |  488 b   |  23 lines

  1. #!/usr/freeware/bin/perl
  2. eval 'exec perl -S $0 "$@"'
  3.     if $running_under_some_shell;
  4.  
  5. # fixscribeps: get conforming PostScript out of Scribe
  6. #
  7. # Copyright (C) Angus J. C. Duggan 1991-1995
  8. # See file LICENSE for details.
  9.  
  10. $inepsf = 0;
  11. $epsfn = 0;
  12. while (<>) {
  13.    if (/^([0-9]+ [0-9]+ [0-9]+ PB) (%!.*)/) {
  14.       print "$1\n%%BeginDocument: Scribe-EPSF $epsfn 0\n$2\n";
  15.       $inepsf++;
  16.    } elsif (/^ PE/ && $inepsf) {
  17.       print "%%EndDocument\n", $_;
  18.    } else {
  19.       print $_;
  20.    }
  21. }
  22.  
  23.